<input hidden="hidden" id="navValue" value="股东列表">
<div class="page-content">
    <div class="page-header">
        <h1>
            股东管理
            <small>
                <i class="ace-icon fa fa-angle-double-right"></i>
                股东列表
            </small>

            <label style="margin-left: 50px;">
                <button type="button" class="btn btn-purple btn-sm" onclick="location='{:url("shareholder/add")}'">
                <span class="ace-icon fa fa-plus-circle icon-on-right bigger-110"></span>
                添加股东
                </button>
            </label>
            <label style="float: right">
                <form action="" method="get">
                    <input type="search" name="phone" style="height: 35px;" class="input-sm" placeholder="手机号码" aria-controls="dynamic-table"  value={:input('get.phone')}>

                    <button id="searchBtn" type="submit" class="dt-button buttons-collection buttons-colvis btn btn-white btn-primary btn-bold" tabindex="0" aria-controls="dynamic-table" data-original-title="" title="搜索"><span><i class="fa fa-search bigger-110 blue"></i></span></button>
                </form>
            </label>
        </h1>
    </div><!-- /.page-header -->

            <div class="row">
                <div class="col-xs-12">
                    <table id="simple-table" class="table  table-bordered table-hover">
                        <thead>
                        <tr>
                            <th class="center">
                                <label class="pos-rel">
                                    <input type="checkbox" class="ace">
                                    <span class="lbl"></span>
                                </label>
                            </th>
                            <th class="center">姓名(昵称)</th>
                            <th class="center">部门</th>
                            <th class="center">电话</th>
                            <th class="center">数量（单位：股）</th>
                            <th class="center">级别</th>
                            <th class="center">昨日业绩</th>
                            <th class="center">总业绩</th>
                            <th class="center">业绩详情</th>
                            <th class="center">操作</th>
                        </tr>
                        </thead>

                        <tbody>
                        {volist name="shareholders" id="shareholder"}
                        <tr  class="center">
                            <td>
                                <label class="pos-rel">
                                    <input type="checkbox" class="ace">
                                    <span class="lbl"></span>
                                </label>
                            </td>
                            <td>{$shareholder -> User -> realname}({$shareholder -> User -> nickname})</td>
                            <td>{$shareholder -> joinDepartment['name']}</td>
                            <td>{$shareholder -> phone}</td>
                            <td>{$shareholder -> shares}</td>
                            <td>{$nickname[$shareholder -> level]}</td>
                            <td>
                                {$shareholder -> getPromanceByDate(strtotime(date('Y-m-d')))}
                            </td>
                            <td>
                                {$shareholder -> getAllPerformances()}
                            </td>
                            <td>
                                <a class="blue" href="{:url('performance/lists')}?phone={$shareholder->phone}">
                                    <i class="ace-icon fa fa-search-plus bigger-130"></i>
                                </a>
                            </td>
                            <td>
                                <div class="hidden-sm hidden-xs btn-group">
                                    <button class="btn btn-xs btn-info" value="{$shareholder -> id}" name="id"  form="editShareholder">
                                        <i class="ace-icon fa fa-pencil bigger-120"></i>
                                    </button>

                                    <button class="btn btn-xs btn-danger" value="{$shareholder -> id}" name="id" form = "deleteShareholder" OnClick="return confirm('你确定删除该股东吗？')">
                                        <i class="ace-icon fa fa-trash-o bigger-120"></i>
                                    </button>
                                </div>
                                <form action="{:url('deleteShareholder')}" method="get" name="deleteShareholder" id="deleteShareholder">
                                </form>
                                <form action="{:url('editShareholder')}" method="get" name="editShareholder" id="editShareholder">
                                </form>
                                <div class="hidden-md hidden-lg">
                                    <div class="inline pos-rel">
                                        <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto">
                                            <i class="ace-icon fa fa-cog icon-only bigger-110"></i>
                                        </button>

                                        <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
                                            <li>
                                                <a href="#" class="tooltip-info" data-rel="tooltip" title="" data-original-title="View">
																			<span class="blue">
																				<i class="ace-icon fa fa-search-plus bigger-120"></i>
																			</span>
                                                </a>
                                            </li>

                                            <li>
                                                <a href="#" class="tooltip-success" data-rel="tooltip" title="" data-original-title="Edit">
																			<span class="green">
																				<i class="ace-icon fa fa-pencil-square-o bigger-120"></i>
																			</span>
                                                </a>
                                            </li>

                                            <li>
                                                <a href="#" class="tooltip-error" data-rel="tooltip" title="" data-original-title="Delete">
																			<span class="red">
																				<i class="ace-icon fa fa-trash-o bigger-120"></i>
																			</span>
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div><!-- /.span -->
            </div><!-- /.row -->
            {$shareholders->render()}

            <a href="/shareholder/getexcel"><button type="button"  class="btn btn-sm btn-success" style="float: right">
               导出
                <i class="ace-icon fa fa-arrow-right icon-on-right bigger-110"></i>
            </button>
            <div class="hr hr-18 dotted hr-double"></div></a>
            <!-- PAGE CONTENT ENDS -->
        </div><!-- /.col -->
    </div><!-- /.row -->
</div>
